<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MODULE_IMAGE:  Fichier source de /home/radius/Documents/Rachid_Licence/LIF7/LIF7_TD1/module-image/src/Image.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Généré par Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Page&nbsp;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li><a href="dirs.html"><span>Répertoires</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Liste&nbsp;des&nbsp;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&nbsp;de&nbsp;fichier</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_53790bda95882cd03745840c1cece42e.html">src</a>
  </div>
</div>
<div class="contents">
<h1>Image.h</h1><a href="_image_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef H_IMAGE_H</span>
<a name="l00008"></a><a class="code" href="_image_8h.html#a819a524059d9f07c479df8e660b5c47b">00008</a> <span class="preprocessor"></span><span class="preprocessor">#define H_Image_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="comment">/* ********************************************************************* */</span>
<a name="l00011"></a>00011 <span class="comment">/*                                                                       */</span>
<a name="l00012"></a>00012 <span class="comment">/*                        Librairies de l&apos;image                          */</span>
<a name="l00013"></a>00013 <span class="comment">/*                                                                       */</span>
<a name="l00014"></a>00014 <span class="comment">/* ********************************************************************* */</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;<a class="code" href="_pixel_8h.html" title="Fichier d&amp;#39;entête du module Pixel.">Pixel.h</a>&quot;</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="comment">/* ********************************************************************* */</span>
<a name="l00022"></a>00022 <span class="comment">/*                                                                       */</span>
<a name="l00023"></a>00023 <span class="comment">/*                        Définitions de types                           */</span>
<a name="l00024"></a>00024 <span class="comment">/*                                                                       */</span>
<a name="l00025"></a>00025 <span class="comment">/* ********************************************************************* */</span>
<a name="l00026"></a>00026 
<a name="l00036"></a><a class="code" href="structs_image.html">00036</a> <span class="keyword">struct </span><a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">sImage</a> {
<a name="l00037"></a>00037 
<a name="l00038"></a><a class="code" href="structs_image.html#a6951df3303ff6144e7786fe41b056082">00038</a>     <a class="code" href="struct_pixel.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Pixel</a> *<a class="code" href="structs_image.html#a6951df3303ff6144e7786fe41b056082">pix</a>; 
<a name="l00039"></a><a class="code" href="structs_image.html#adb2d38c3505ca0be7cb014f64a302cbe">00039</a>     <span class="keywordtype">int</span> <a class="code" href="structs_image.html#adb2d38c3505ca0be7cb014f64a302cbe">dimx</a>;   
<a name="l00040"></a><a class="code" href="structs_image.html#a14c6823faa298b6c3d0767bd9ffaa769">00040</a>     <span class="keywordtype">int</span> <a class="code" href="structs_image.html#a14c6823faa298b6c3d0767bd9ffaa769">dimy</a>;   
<a name="l00042"></a>00042 } ;
<a name="l00043"></a>00043 
<a name="l00048"></a><a class="code" href="_image_8h.html#abbe0c74b95d97226a5e1f28a814631b8">00048</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">sImage</a> <a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> ;
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="comment">/* ********************************************************************* */</span>
<a name="l00053"></a>00053 <span class="comment">/*                                                                       */</span>
<a name="l00054"></a>00054 <span class="comment">/*                 Fonctions relatives aux images                        */</span>
<a name="l00055"></a>00055 <span class="comment">/*                                                                       */</span>
<a name="l00056"></a>00056 <span class="comment">/* ********************************************************************* */</span>
<a name="l00057"></a>00057 
<a name="l00067"></a>00067 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#a6edbdf3bfe3beb4e44246a6c7985055c" title="Initialise une image.">imInit</a> ( <a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *im, <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="structs_image.html#adb2d38c3505ca0be7cb014f64a302cbe">dimx</a>, <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="structs_image.html#a14c6823faa298b6c3d0767bd9ffaa769">dimy</a>) ;
<a name="l00068"></a>00068 
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#a5931290abc22d365ae351381c594613f" title="Libère une image de la mémoire.">imLibere</a> (<a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *im) ;
<a name="l00077"></a>00077 
<a name="l00086"></a>00086 <a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> * <a class="code" href="_image_8c.html#a13ab11befc99f60ea0a5255e22f7f2be" title="Alloue dans le tas une structure Image puis l&amp;#39;initialise avec imInit.">imCreer</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="structs_image.html#adb2d38c3505ca0be7cb014f64a302cbe">dimx</a>, <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="structs_image.html#a14c6823faa298b6c3d0767bd9ffaa769">dimy</a>) ;
<a name="l00087"></a>00087 
<a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#ae9d0336b23f7c615e57c4862714df90f" title="Libere le tableau de pixel en appelant imLibere puis détruit la structure image...">imDetruire</a>(<a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *im) ;
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="comment">/* ********************************************************************* */</span>
<a name="l00098"></a>00098 <span class="comment">/*                                                                       */</span>
<a name="l00099"></a>00099 <span class="comment">/*           Accesseurs et Mutateurs de la structure Image               */</span>
<a name="l00100"></a>00100 <span class="comment">/*                                                                       */</span>
<a name="l00101"></a>00101 <span class="comment">/* ********************************************************************* */</span>
<a name="l00102"></a>00102 
<a name="l00112"></a>00112 <a class="code" href="struct_pixel.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Pixel</a> <a class="code" href="_image_8c.html#a1cb04a46ed83be9a0c49b3b884c91d62" title="Récupère le pixel de coordonnée (x,y) en vérifiant leur validité.">getPix</a>(<span class="keyword">const</span> <a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *im, <span class="keyword">const</span> <span class="keywordtype">int</span> x, <span class="keyword">const</span> <span class="keywordtype">int</span> y) ;
<a name="l00113"></a>00113 
<a name="l00114"></a>00114 
<a name="l00125"></a>00125 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#ad239628e88372f488e18848112517521" title="Modifie le pixel de coordonnée (x,y).">setPix</a>(<a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *im, <span class="keyword">const</span> <span class="keywordtype">int</span> x, <span class="keyword">const</span> <span class="keywordtype">int</span> y,<span class="keyword">const</span> <a class="code" href="struct_pixel.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Pixel</a> * couleur) ;
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 <span class="comment">/* ********************************************************************* */</span>
<a name="l00129"></a>00129 <span class="comment">/*                                                                       */</span>
<a name="l00130"></a>00130 <span class="comment">/*                 Fonctions relatives aux rectangles                    */</span>
<a name="l00131"></a>00131 <span class="comment">/*                                                                       */</span>
<a name="l00132"></a>00132 <span class="comment">/* ********************************************************************* */</span>
<a name="l00133"></a>00133 
<a name="l00146"></a>00146 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#aae7e2d32a1d4c4516a818d8a473c0a86" title="Dessine un rectangle de couleur dans l&amp;#39;image en utilisant setPix.">imDessineRectangle</a>(<a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *im, <span class="keyword">const</span> <span class="keywordtype">int</span> Xmin, <span class="keyword">const</span> <span class="keywordtype">int</span> Ymin, <span class="keyword">const</span> <span class="keywordtype">int</span> Xmax, <span class="keyword">const</span> <span class="keywordtype">int</span> Ymax,<span class="keyword">const</span> <a class="code" href="struct_pixel.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Pixel</a> * couleur) ;
<a name="l00147"></a>00147 
<a name="l00148"></a>00148 
<a name="l00157"></a>00157 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#aa04f50f4353fee39ec6cfd7201ab0367" title="Efface l&amp;#39;image en appelant imDessineRectangle avec le bon rectangle.">imEffacer</a>(<a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *im, <span class="keyword">const</span> <a class="code" href="struct_pixel.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Pixel</a> * couleur) ;
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 <span class="comment">/* ********************************************************************* */</span>
<a name="l00160"></a>00160 <span class="comment">/*                                                                       */</span>
<a name="l00161"></a>00161 <span class="comment">/*             Fonctions relatives aux gestiond&apos;images                   */</span>
<a name="l00162"></a>00162 <span class="comment">/*                                                                       */</span>
<a name="l00163"></a>00163 <span class="comment">/* ********************************************************************* */</span>
<a name="l00164"></a>00164 
<a name="l00173"></a>00173 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#a20b9ad35b6db7bd09d7452574d04dd50" title="sauvegarde une image au format .ppm.">imSauver</a>(<span class="keyword">const</span> <a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *pIm, <span class="keyword">const</span> <span class="keywordtype">char</span> filename[]) ;
<a name="l00174"></a>00174 
<a name="l00183"></a>00183 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#a0a1f0b9be4b910e1cfc2648cfa9e38fd" title="Ouvre une image au format .ppm.">imOuvrir</a>(<a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *pIm, <span class="keyword">const</span> <span class="keywordtype">char</span> filename[]) ;
<a name="l00184"></a>00184 
<a name="l00192"></a>00192 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#afadf8ab43119d304c72e201d0d95164d" title="sauvegarde une image au format .ppm.">imPrintf</a>(<span class="keyword">const</span> <a class="code" href="structs_image.html" title="Structure utilisée pour la gestion d&amp;#39;une image.">Image</a> *pIm) ;
<a name="l00193"></a>00193 
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 <span class="comment">/* ********************************************************************* */</span>
<a name="l00197"></a>00197 <span class="comment">/*                                                                       */</span>
<a name="l00198"></a>00198 <span class="comment">/*                           Test de regression                          */</span>
<a name="l00199"></a>00199 <span class="comment">/*                                                                       */</span>
<a name="l00200"></a>00200 <span class="comment">/* ********************************************************************* */</span>
<a name="l00201"></a>00201 
<a name="l00208"></a>00208 <span class="keywordtype">void</span> <a class="code" href="_image_8c.html#a4fdd00deba298ac07e0636bace7a0e61" title="Teste toutes les fonctions du module image.h.">ImRegressionTest</a>(<span class="keywordtype">void</span>) ;
<a name="l00209"></a>00209 
<a name="l00210"></a>00210 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Généré le Fri Oct 21 20:06:53 2011 pour MODULE_IMAGE par&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>
